home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!hpl3sn03.cern.ch
- From: Dan Pop <danpop@mail.cern.ch>
- Newsgroups: comp.lang.c
- Subject: Re: Why isn't return address in the stack protected?
- Date: Wed, 24 Jan 1996 12:45:43 +0100
- Organization: CERN European Lab for Particle Physics
- Message-ID: <9601241145.AA16544@dxmint.cern.ch>
- References: <DLo4xF.MH@un.seqeb.gov.au>
- X-NNTP-Posting-Host: hpl3sn03.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
- X-Mail2News-Path: dxmint.cern.ch!hpl3sn03.cern.ch
-
- al012@svtstu.seqeb.gov.au (Anthony Lee) writes:
-
- >to fall over. My question is why can't the run time environment
- >protect the stack from such access and flag an error?
-
- Because the run time environment has no way to distinguish between a
- correct write operation on the stack and an erroneous one. The compiler
- can do this (at least in some cases), by generating appropriate code
- (and there are compilers that do it) but the program execution is
- considerably slowed down.
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-